# -*- coding: utf-8 -*-
"""
Created on Wed Nov 29 08:54:57 2017

@author: tony
"""
 

'''字符串的split分割使用'''

s = '''001::aaa (1990)::Horror
002::bbb (1992)::Drama
003::ccc (1980)::Action|Drama|Thriller'''

c=0
ss= s.split('\n')
for x in ss:
    k = x.split("::")
#===============================================================================
#     print 'bianhao:', k[0],
#     print 'name:', k[1][:-6],
#     print 'year:', k[1][-5:-1]
#===============================================================================
    
    lx=k[2].split("|")
    i=0
    
    for n in lx:
#===============================================================================
#         print 'leixing:' + str(i), n
#===============================================================================
        if n == 'Drama':
            c+=1  
            print c,k[1][:-6]
        i += 1
print c


        